package com.linzp.bishe.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.linzp.bishe.entity.Accounts;
import com.linzp.bishe.entity.Users;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @ClassName AccountsExcel
 * @Description Account类的账号处理
 * @Author LinZePeng
 * @Date 2022/1/15 10:09
 * @Version 1.0
 */
@Data
@EqualsAndHashCode
public class AccountsExcel {
	@ExcelProperty("姓名")
	private String userName;

	@ExcelProperty("性别")
	private String sex;

	@ExcelProperty("账号")
	private String account;

	@ExcelProperty("密码")
	private String passwords;

	@ExcelProperty("角色")
	private String roles;



	public Accounts getAccounts(){
		Accounts accounts = new Accounts();
		accounts.setAccounts(this.account);
		accounts.setPasswords(this.passwords);
		accounts.setRoles(this.roles);
		return accounts;
	}
	public Users getUsers(){
		Users user = new Users();
		user.setUserName(this.userName);
		user.setSex(this.sex);
		return user;
	}
}
